using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Reflection;

namespace NETColorsExplorer
{
    public class StandardColorsProvider : ColorsProvider
    {
        public override Type ColorProviderType
        {
            get { return typeof(Color); }
        }

        protected override List<Color> GetColorList()
        {
            List<Color> list = new List<Color>();

            Type type = typeof(Color);
            PropertyInfo[] piList = type.GetProperties( BindingFlags.Static | BindingFlags.Public );

            foreach (PropertyInfo propInfo in piList)
            {
                object objColor = propInfo.GetValue(null, null);
                list.Add((Color)objColor);
            }

            return list;
        }
    }
}
